package com.naiterui.ehp.bs.agent.feign;

import java.util.List;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.naiterui.common.repository.page.PageVO;
import com.naiterui.ehp.bp.bo.agent.ProvinceItemBO;
import com.naiterui.ehp.bp.bo.statistics.CustomOrderReportBO;
import com.naiterui.ehp.bp.bo.statistics.CustomProductReportBO;
import com.naiterui.ehp.bp.bo.statistics.CustomRecipelConsultReportBO;
import com.naiterui.ehp.bp.bo.statistics.DataReportBO;
import com.naiterui.ehp.bp.bo.statistics.DataReportInviteBO;
import com.naiterui.ehp.bp.bo.statistics.DataReportProductBO;
import com.naiterui.ehp.bp.bo.statistics.DataReportRecipelBO;
import com.naiterui.ehp.bp.support.config.FeignConfiguration;

/**
 * es搜索服务
 * 
 * @author yangfuya
 * @since 2022/2/16
 */
@FeignClient(name = "cmsapi", url = "${ehp.domain.cmsapi}", configuration = FeignConfiguration.class)
public interface ICmsapiFeignClient {

    /**
     * 客户详情-数据报表处方相关
     */
    @GetMapping("/inner/statistics/getRecipelAndConsult")
    CustomRecipelConsultReportBO getRecipelAndConsult(@RequestParam("customId") Long customId,
        @RequestParam("reportType") Integer reportType, @RequestParam("reportDate") String reportDate);

    /**
     * 客户详情-数据报告药品
     */
    @GetMapping("/inner/statistics/getProduct")
    CustomProductReportBO getProduct(@RequestParam("customId") Long customId,
        @RequestParam("reportType") Integer reportType, @RequestParam("reportDate") String reportDate);

    /**
     * 客户详情-数据报告订单
     */
    @GetMapping("/inner/statistics/getOrder")
    CustomOrderReportBO getOrder(@RequestParam("customId") Long customId,
        @RequestParam("reportType") Integer reportType, @RequestParam("reportDate") String reportDate);

    /**
     * 数据报表-首页
     */
    @GetMapping("/inner/statistics/getDateReportIndex")
    DataReportBO getDateReportIndex(@RequestParam("agentId") Long agentId);

    /**
     * 数据报表-处方相关
     */
    @GetMapping("/inner/statistics/getRecipelDateReport")
    DataReportRecipelBO getRecipelDateReport(@RequestParam("agentId") Long agentId,
        @RequestParam("reportType") Integer reportType, @RequestParam("reportDate") String reportDate);

    /**
     * 数据报表-邀请医生
     */
    @GetMapping("/inner/statistics/getInviteDataReport")
    DataReportInviteBO getInviteDataReport(@RequestParam("agentId") Long agentId,
        @RequestParam("reportType") Integer reportType, @RequestParam("reportDate") String reportDate);

    /**
     * 数据报告-商品售卖
     */
    @GetMapping("/inner/statistics/getProductPage")
    PageVO<DataReportProductBO> getProductPage(@RequestParam("pageNo") int pageNo,
        @RequestParam("pageSize") int pageSize, @RequestParam("agentId") Long agentId,
        @RequestParam("reportType") Integer reportType, @RequestParam("reportDate") String reportDate);

    /**
     * 区域统计-省份统计
     */
    @GetMapping("/inner/statistics/getProviceTotal")
    List<ProvinceItemBO> getProviceTotal(@RequestParam("areaId") Long areaId,
        @RequestParam("proviceAreaIStr") String proviceAreaIStr,
        @RequestParam(value = "year", required = false) String year,
        @RequestParam(value = "month", required = false) String month);
}
